package com.example.manager.entity;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
@Entity
@Table(name="course_selection")
public class CourseSelection {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@ManyToOne private Student student;
	@ManyToOne private CourseTeaching courseTeaching;
	
	@OneToMany(mappedBy = "courseSelection") private List<StudentSubScore> studentSubScore;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Student getStudent() {
		return student;
	}
	public void setStudent(Student student) {
		this.student = student;
	}
	public CourseTeaching getCourseTeaching() {
		return courseTeaching;
	}
	public void setCourseTeaching(CourseTeaching courseTeaching) {
		this.courseTeaching = courseTeaching;
	}
	@Override
	public String toString() {
		return "CourseSelection [id=" + id + ", student=" + student + ", courseTeaching=" + courseTeaching
				+ ", studentSubScore=" + studentSubScore + "]";
	}
	
}
